<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var firstName; //声明一个变量
        firstName = "Pooh Winnie"; // 赋值一个字符串
        console.log(firstName); //向控制台打印

        var a, b, c; //同时声明多个变量
        a = 1;
        b = 2;
        c = 3;
        // console.log(a, b, c);
        console.log("a的值" + a);
        console.log("b的值" + a);
        console.log("c的值" + a);

        var lastName = "wu";
        console.log(lastName + firstName); //wuPooh Winnie


        //变量声明的特殊情况
        // 1.只声明不赋值，结果是啥？
        var age;
        console.log(age);
        //undefined 未定义的


        // 2.不声明也不赋值，结果会发生什么?
        console.log(set);
        //结果是报错 Uncaught ReferenceError: set is not defined


        // 3.不声明直接使用的结果?
        num = 100;
        console.log(num);
        // 100 可以不推荐
    </script>
</body>

</html>